fix(acp): forward resolved credential pool#70293
Open
stefanpieter wants to merge 1 commit into
Open
Conversation
4 tasks
Contributor
|
Cross-link for maintainers: we hit the same ACP missing- Your PR (#70293) is the clean minimal fix for pool handoff — thanks for landing that path. We also opened #70465 with the same handoff plus 403-shaped OAuth recovery (xAI often returns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
ACP resolved complete provider runtime state but dropped the selected
credential_poolwhen constructingAIAgent. Long-lived OpenAI Codex ACP sessions therefore could not use Hermes' existing in-process OAuth 401 refresh/rotation path and required an ACP restart after token expiry.This forwards the already resolved, provider-scoped pool into ACP-created agents. It keeps authentication ownership in Hermes core, preserves existing account/provider guards, and requires no VS Code extension-side token handling or routine ACP replacement.
Related Issue
Fixes #70292
Related to #70097 / #70111, but distinct: those address refresh/adoption once a credential pool is attached; this fixes ACP omitting the pool entirely.
Type of Change
Changes Made
acp_adapter/session.py: forwardruntime["credential_pool"]into ACP-createdAIAgentinstances.tests/acp/test_session.py: extend the ACP construction regression to assert that resolved credential pools are retained.How to Test
openai-codexOAuth and start a long-livedhermes acpprocess.Automated/local verification:
A real patched ACP JSON-RPC smoke request returned exactly
ACP_POOL_OKin the same ACP PID; the temporary session was deleted. A live runtime invariant check also confirmed that the selected pool entry matches the agent API key and that the pool provider matches the agent provider.Full-suite baseline comparison:
scripts/run_tests.shrun reported 28 failures in 17 files outside the changed ACP/Codex scope.c4f5a45dreproduced the same 28 failures.acp_adapter/session.py,tests/acp/,tests/acp_adapter/, or the Codex-response recovery suite.Checklist
Code
AGENTS.md.scripts/run_tests.shCI-parity wrapper.Documentation & Housekeeping
cli-config.yaml.example: N/A; no config keys changed.CONTRIBUTING.md/AGENTS.md: N/A; no architecture or workflow change.Screenshots / Logs